package io.renren.common.utils;

public class StringUtil {
	
/**
 * 空串转为默认字符串
 * @param source
 * @param defaultStirng
 * @return
 */
public static String getDefaultIfEmpty(Object source,String defaultStirng){
		if(null == source || "".equals((String)source)){
			return defaultStirng;
		}
		return (String)source;
	}
/**
 * null转为""
 * @param source
 * @return
 */
public static String getFormatNull(Object source){
	if(source == null){
		return "";
	}
	return (String)source;
}

public static boolean isEmpty(String cat) {
	if("".equals(cat) || null == cat){
		return true;
	}
	return false;
}

}
